/**
 * 
 */
package test;

import java.io.IOException;
import java.net.ServerSocket;

/**
 * @author Josh
 *
 */
public class ServerDispatcher {
		
	private static boolean debug = true;

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		boolean run = true;
		try {
			ServerSocket serverSocket = new ServerSocket(1444);
			if(debug) {
				System.out.println("Server dispatcher listening on port 1444");
			}
			while(run) {
				new ServerThread(serverSocket.accept()).start();
			}
		} catch (IOException e) {
			if(debug) {
				e.printStackTrace();
			}
			run = false;
		}

	}

}
